import { IsNumber, IsOptional, IsString } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';

export class GetUserListDto {
  @ApiProperty({
    example: '18511234567n',
    description: '手机',
    required: false,
  })
  @IsOptional()
  @IsString()
  phone: string;

  @ApiProperty({ example: '1', description: '页数' })
  @IsNumber()
  page: number;

  @ApiProperty({ example: '20', description: '每页数' })
  @IsNumber()
  pageSize: number;

  @ApiProperty({
    example: '2023-05-01 14:00:00',
    description: '开始日期',
    required: false,
  })
  @IsString()
  @IsOptional()
  startDate: string;

  @ApiProperty({
    example: '2023-06-01 14:00:00',
    description: '结束日期',
    required: false,
  })
  @IsString()
  @IsOptional()
  endDate: string;
}
